﻿using System;
using System.Collections.Generic;
using System.Text;

namespace XMK.Framework.DataAccess
{
    /// <summary>
    /// 数据库缓存依赖
    /// </summary>
    public abstract class DbDependency<T>where T : new()
    {
        /// <summary>
        /// 数据缓存KEY
        /// </summary>
        protected string CacheKey;
        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        protected string ConnString;
        /// <summary>
        /// 数据库查询字符串
        /// </summary>
        protected string SqlText;
        /// <summary>
        /// 填充委托
        /// </summary>
        protected DataRowFullInfoFun<T> Fun;
        /// <summary>
        /// 使用缓存机制获取查询列表
        /// </summary>
        /// <returns>缓存或者数据库查询返回数据列表</returns>
        public abstract List<T> GetCacheData();
    }
}
